Simulate Reference and High Electrification scenarios from Electrification Futures
And compares to a glass baseline with High bifacial future projection.
=======This journal simulates the Reference and High Electrification scenarios from Electrification Futures, and comparing to a glass baseline with High bifacial future projection.
Installed Capacity considerations from bifacial installations are not considered here.
Results from this journal were presented during Duramat's webinar April 2021 – “The Impacts of Module Reliability and Lifetime on PV in the Circular Economy" presented by Teresa Barnes, Silvana Ayala, and Heather Mirletz, NREL.
>>>>>>> mainimport os
from pathlib import Path
testfolder = str(Path().resolve().parent.parent / 'PV_ICE' / 'TEMP')
# Another option using relative address; for some operative systems you might need '/' instead of '\'
# testfolder = os.path.abspath(r'..\..\PV_DEMICE\TEMP')
print ("Your simulation will be stored in %s" % testfolder)
Your simulation will be stored in C:\Users\sayala\Documents\GitHub\CircularEconomy-MassFlowCalculator\PV_ICE\TEMP<<<<<<< HEAD =======
MATERIALS = ['glass','silver','silicon', 'copper','aluminium_frames']
MATERIAL = MATERIALS[0]
MODULEBASELINE = r'..\baselines\ElectrificationFutures_2021\baseline_modules_US_NREL_Electrification_Futures_2021_basecase.csv'
MODULEBASELINE_High = r'..\baselines\ElectrificationFutures_2021\baseline_modules_US_NREL_Electrification_Futures_2021_LowREHighElec.csv'
import PV_ICE
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
PV_ICE.__version__
'0+untagged.416.g1b87254'
'0+untagged.469.g6e6de9b.dirty'
plt.rcParams.update({'font.size': 22})
plt.rcParams['figure.figsize'] = (12, 5)
r1 = PV_ICE.Simulation(name='Simulation1', path=testfolder)
r1.createScenario(name='base', file=MODULEBASELINE)
for mat in range (0, len(MATERIALS)):
MATERIALBASELINE = r'..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r1.scenario['base'].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
r1.createScenario(name='high', file=MODULEBASELINE_High)
for mat in range (0, len(MATERIALS)):
MATERIALBASELINE = r'..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r1.scenario['high'].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
r2 = PV_ICE.Simulation(name='bifacialTrend', path=testfolder)
r2.createScenario(name='base', file=MODULEBASELINE)
MATERIALBASELINE = r'..\baselines\PVSC_2021\baseline_material_glass_bifacialTrend.csv'
r2.scenario['base'].addMaterial('glass', file=MATERIALBASELINE)
for mat in range (1, len(MATERIALS)):
MATERIALBASELINE = r'..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r2.scenario['base'].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
r2.createScenario(name='high', file=MODULEBASELINE_High)
MATERIALBASELINE = r'..\baselines\PVSC_2021\baseline_material_glass_bifacialTrend.csv'
r2.scenario['high'].addMaterial('glass', file=MATERIALBASELINE)
for mat in range (1, len(MATERIALS)):
MATERIALBASELINE = r'..\baselines\baseline_material_'+MATERIALS[mat]+'.csv'
r2.scenario['high'].addMaterial(MATERIALS[mat], file=MATERIALBASELINE)
path = C:\Users\sayala\Documents\GitHub\CircularEconomy-MassFlowCalculator\PV_ICE\TEMP path = C:\Users\sayala\Documents\GitHub\CircularEconomy-MassFlowCalculator\PV_ICE\TEMP
IRENA= False
ELorRL = 'EL'
if IRENA:
if ELorRL == 'RL':
weibullInputParams = {'alpha': 5.3759} # Regular-loss scenario IRENA
if ELorRL == 'EL':
weibullInputParams = {'alpha': 2.49} # Regular-loss scenario IRENA
r1.calculateMassFlow(weibullInputParams=weibullInputParams, weibullAlphaOnly=True)
r2.calculateMassFlow(weibullInputParams=weibullInputParams, weibullAlphaOnly=True)
title_Method = 'Irena_'+ELorRL
else:
r1.calculateMassFlow()
r2.calculateMassFlow()
title_Method = 'PVICE'
Working on Scenario: base ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper ==> Working on Material : aluminium_frames Working on Scenario: high ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper ==> Working on Material : aluminium_frames Working on Scenario: base ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper ==> Working on Material : aluminium_frames Working on Scenario: high ******************** Finished Area+Power Generation Calculations ==> Working on Material : glass ==> Working on Material : silver ==> Working on Material : silicon ==> Working on Material : copper ==> Working on Material : aluminium_frames
objects = [r1, r2]
scenarios = ['base', 'high']
USyearly=pd.DataFrame()
keyword='mat_Total_Landfilled'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
# Loop over objects
for kk in range(0, len(objects)):
obj = objects[kk]
# Loop over Scenarios
for jj in range(0, len(scenarios)):
case = scenarios[jj]
for ii in range (0, len(materials)):
material = materials[ii]
foo = obj.scenario[case].material[material].materialdata[keyword].copy()
foo = foo.to_frame(name=material)
USyearly["Waste_"+material+'_'+obj.name+'_'+case] = foo[material]
filter_col = [col for col in USyearly if (col.startswith('Waste') and col.endswith(obj.name+'_'+case)) ]
USyearly['Waste_Module_'+obj.name+'_'+case] = USyearly[filter_col].sum(axis=1)
# Converting to grams to Tons.
USyearly.head(20)
| Waste_glass_Simulation1_base | Waste_silicon_Simulation1_base | Waste_silver_Simulation1_base | Waste_copper_Simulation1_base | Waste_aluminium_frames_Simulation1_base | Waste_Module_Simulation1_base | Waste_glass_Simulation1_high | Waste_silicon_Simulation1_high | Waste_silver_Simulation1_high | Waste_copper_Simulation1_high | ... | Waste_silver_bifacialTrend_base | Waste_copper_bifacialTrend_base | Waste_aluminium_frames_bifacialTrend_base | Waste_Module_bifacialTrend_base | Waste_glass_bifacialTrend_high | Waste_silicon_bifacialTrend_high | Waste_silver_bifacialTrend_high | Waste_copper_bifacialTrend_high | Waste_aluminium_frames_bifacialTrend_high | Waste_Module_bifacialTrend_high | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 3.557465e+07 | 7.064407e+07 | 1.903224e+05 | 2.848183e+03 | 3.797870e+06 | 1.102098e+08 | 3.557465e+07 | 7.064407e+07 | 1.903224e+05 | 2.848183e+03 | ... | 1.903224e+05 | 2.848183e+03 | 3.797870e+06 | 1.102098e+08 | 3.557465e+07 | 7.064407e+07 | 1.903224e+05 | 2.848183e+03 | 3.797870e+06 | 1.102098e+08 |
| 1 | 2.708324e+07 | 5.272248e+07 | 1.392646e+05 | 2.169933e+03 | 2.823082e+06 | 8.277023e+07 | 2.708324e+07 | 5.272248e+07 | 1.392646e+05 | 2.169933e+03 | ... | 1.392646e+05 | 2.169933e+03 | 2.823082e+06 | 8.277023e+07 | 2.708324e+07 | 5.272248e+07 | 1.392646e+05 | 2.169933e+03 | 2.823082e+06 | 8.277023e+07 |
| 2 | 3.215794e+07 | 6.125064e+07 | 1.590017e+05 | 2.609763e+03 | 3.015525e+06 | 9.658572e+07 | 3.215794e+07 | 6.125064e+07 | 1.590017e+05 | 2.609763e+03 | ... | 1.590017e+05 | 2.609763e+03 | 3.015525e+06 | 9.658572e+07 | 3.215794e+07 | 6.125064e+07 | 1.590017e+05 | 2.609763e+03 | 3.015525e+06 | 9.658572e+07 |
| 3 | 3.246804e+07 | 6.001756e+07 | 1.558401e+05 | 2.828400e+03 | 2.960336e+06 | 9.560460e+07 | 3.246804e+07 | 6.001756e+07 | 1.558401e+05 | 2.828400e+03 | ... | 1.558401e+05 | 2.828400e+03 | 2.960336e+06 | 9.560460e+07 | 3.246804e+07 | 6.001756e+07 | 1.558401e+05 | 2.828400e+03 | 2.960336e+06 | 9.560460e+07 |
| 4 | 4.681363e+07 | 8.317952e+07 | 2.210346e+05 | 4.625451e+03 | 4.447433e+06 | 1.346662e+08 | 4.681363e+07 | 8.317952e+07 | 2.210346e+05 | 4.625451e+03 | ... | 2.210346e+05 | 4.625451e+03 | 4.447433e+06 | 1.346662e+08 | 4.681363e+07 | 8.317952e+07 | 2.210346e+05 | 4.625451e+03 | 4.447433e+06 | 1.346662e+08 |
| 5 | 5.956584e+07 | 9.979721e+07 | 1.985433e+05 | 7.251887e+03 | 6.229870e+06 | 1.657987e+08 | 5.956584e+07 | 9.979721e+07 | 1.985433e+05 | 7.251887e+03 | ... | 1.985433e+05 | 7.251887e+03 | 6.229870e+06 | 1.657987e+08 | 5.956584e+07 | 9.979721e+07 | 1.985433e+05 | 7.251887e+03 | 6.229870e+06 | 1.657987e+08 |
| 6 | 8.272290e+07 | 1.292807e+08 | 2.979944e+05 | 1.239959e+04 | 9.677156e+06 | 2.219911e+08 | 8.272290e+07 | 1.292807e+08 | 2.979944e+05 | 1.239959e+04 | ... | 2.979944e+05 | 1.239959e+04 | 9.677156e+06 | 2.219911e+08 | 8.272290e+07 | 1.292807e+08 | 2.979944e+05 | 1.239959e+04 | 9.677156e+06 | 2.219911e+08 |
| 7 | 1.294118e+08 | 1.907181e+08 | 4.886206e+05 | 2.206772e+04 | 1.628803e+07 | 3.369286e+08 | 1.294118e+08 | 1.907181e+08 | 4.886206e+05 | 2.206772e+04 | ... | 4.886206e+05 | 2.206772e+04 | 1.628803e+07 | 3.369286e+08 | 1.294118e+08 | 1.907181e+08 | 4.886206e+05 | 2.206772e+04 | 1.628803e+07 | 3.369286e+08 |
| 8 | 1.887176e+08 | 2.607935e+08 | 7.523668e+05 | 3.646577e+04 | 2.571493e+07 | 4.760149e+08 | 1.887176e+08 | 2.607935e+08 | 7.523668e+05 | 3.646577e+04 | ... | 7.523668e+05 | 3.646577e+04 | 2.571493e+07 | 4.760149e+08 | 1.887176e+08 | 2.607935e+08 | 7.523668e+05 | 3.646577e+04 | 2.571493e+07 | 4.760149e+08 |
| 9 | 3.002429e+08 | 4.109054e+08 | 1.188847e+06 | 5.977646e+04 | 4.122395e+07 | 7.536209e+08 | 3.002429e+08 | 4.109054e+08 | 1.188847e+06 | 5.977646e+04 | ... | 1.188847e+06 | 5.977646e+04 | 4.122395e+07 | 7.536209e+08 | 3.002429e+08 | 4.109054e+08 | 1.188847e+06 | 5.977646e+04 | 4.122395e+07 | 7.536209e+08 |
| 10 | 9.712870e+08 | 5.421610e+08 | 8.669476e+06 | 5.191413e+05 | 2.973426e+08 | 1.819979e+09 | 3.351979e+08 | 4.738747e+08 | 1.518025e+06 | 8.225270e+04 | ... | 8.669476e+06 | 5.191413e+05 | 2.973426e+08 | 1.819979e+09 | 3.351979e+08 | 4.738747e+08 | 1.518025e+06 | 8.225270e+04 | 5.246329e+07 | 8.631361e+08 |
| 11 | 7.829401e+08 | 5.801720e+08 | 6.273556e+06 | 3.885719e+05 | 2.190589e+08 | 1.588833e+09 | 3.776974e+08 | 5.376871e+08 | 1.929576e+06 | 1.102368e+05 | ... | 6.273556e+06 | 3.885719e+05 | 2.190589e+08 | 1.588833e+09 | 3.776974e+08 | 5.376871e+08 | 1.929576e+06 | 1.102368e+05 | 6.749858e+07 | 9.849229e+08 |
| 12 | 8.236658e+08 | 1.729869e+09 | 1.644644e+06 | 7.743406e+04 | 6.319147e+07 | 2.618448e+09 | 9.823191e+08 | 1.746774e+09 | 3.402026e+06 | 1.864028e+05 | ... | 1.644644e+06 | 7.743406e+04 | 6.319147e+07 | 2.618448e+09 | 9.823191e+08 | 1.746774e+09 | 3.402026e+06 | 1.864028e+05 | 1.237170e+08 | 2.856399e+09 |
| 13 | 8.122343e+08 | 1.679519e+09 | 1.654403e+06 | 8.811729e+04 | 6.634735e+07 | 2.559843e+09 | 9.982478e+08 | 1.699330e+09 | 3.712867e+06 | 2.158780e+05 | ... | 1.654403e+06 | 8.811729e+04 | 6.634735e+07 | 2.559843e+09 | 9.982478e+08 | 1.699330e+09 | 3.712867e+06 | 2.158780e+05 | 1.372690e+08 | 2.838775e+09 |
| 14 | 1.124835e+09 | 2.248071e+09 | 2.274499e+06 | 1.340193e+05 | 9.566111e+07 | 3.470975e+09 | 1.320263e+09 | 2.268873e+09 | 4.434660e+06 | 2.682466e+05 | ... | 2.274499e+06 | 1.340193e+05 | 9.566111e+07 | 3.470975e+09 | 1.320263e+09 | 2.268873e+09 | 4.434660e+06 | 2.682466e+05 | 1.701202e+08 | 3.763960e+09 |
| 15 | 1.873490e+09 | 1.767385e+09 | 2.414865e+06 | 2.297470e+05 | 1.607333e+08 | 3.804254e+09 | 2.194582e+09 | 1.801678e+09 | 5.987860e+06 | 4.502842e+05 | ... | 2.414865e+06 | 2.297470e+05 | 1.607333e+08 | 3.804254e+09 | 2.194582e+09 | 1.801678e+09 | 5.987860e+06 | 4.502842e+05 | 2.835703e+08 | 4.286268e+09 |
| 16 | 4.424479e+09 | 4.194998e+09 | 4.456339e+06 | 4.923753e+05 | 3.555811e+08 | 8.980007e+09 | 4.604623e+09 | 4.213958e+09 | 6.402767e+06 | 6.161050e+05 | ... | 4.456339e+06 | 4.923753e+05 | 3.555811e+08 | 8.980007e+09 | 4.604623e+09 | 4.213958e+09 | 6.402767e+06 | 6.161050e+05 | 4.232775e+08 | 9.248878e+09 |
| 17 | 7.995833e+09 | 7.411307e+09 | 1.129163e+07 | 1.148255e+06 | 7.531884e+08 | 1.617277e+10 | 7.995833e+09 | 7.411307e+09 | 1.129163e+07 | 1.148255e+06 | ... | 1.129163e+07 | 1.148255e+06 | 7.531884e+08 | 1.617277e+10 | 7.995833e+09 | 7.411307e+09 | 1.129163e+07 | 1.148255e+06 | 7.531884e+08 | 1.617277e+10 |
| 18 | 1.012265e+10 | 8.928549e+09 | 1.107252e+07 | 1.382319e+06 | 7.971335e+08 | 1.986078e+10 | 1.012265e+10 | 8.928549e+09 | 1.107252e+07 | 1.382319e+06 | ... | 1.107252e+07 | 1.382319e+06 | 7.971335e+08 | 1.986078e+10 | 1.012265e+10 | 8.928549e+09 | 1.107252e+07 | 1.382319e+06 | 7.971335e+08 | 1.986078e+10 |
| 19 | 9.519222e+09 | 8.055741e+09 | 1.288704e+07 | 1.580862e+06 | 8.515391e+08 | 1.844097e+10 | 9.519222e+09 | 8.055741e+09 | 1.288704e+07 | 1.580862e+06 | ... | 1.288704e+07 | 1.580862e+06 | 8.515391e+08 | 1.844097e+10 | 9.519222e+09 | 8.055741e+09 | 1.288704e+07 | 1.580862e+06 | 8.515391e+08 | 1.844097e+10 |
20 rows × 24 columns
keyword='mat_Total_EOL_Landfilled'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
# Loop over objects
for kk in range(0, len(objects)):
obj = objects[kk]
# Loop over Scenarios
for jj in range(0, len(scenarios)):
case = scenarios[jj]
for ii in range (0, len(materials)):
material = materials[ii]
foo = obj.scenario[case].material[material].materialdata[keyword].copy()
foo = foo.to_frame(name=material)
USyearly["Waste_EOL_"+material+'_'+obj.name+'_'+case] = foo[material]
filter_col = [col for col in USyearly if (col.startswith('Waste') and col.endswith(obj.name+'_'+case)) ]
USyearly['Waste_EOL_Module_'+obj.name+'_'+case] = USyearly[filter_col].sum(axis=1)
# Converting to grams to Tons.
USyearly.head(20)
| Waste_glass_Simulation1_base | Waste_silicon_Simulation1_base | Waste_silver_Simulation1_base | Waste_copper_Simulation1_base | Waste_aluminium_frames_Simulation1_base | Waste_Module_Simulation1_base | Waste_glass_Simulation1_high | Waste_silicon_Simulation1_high | Waste_silver_Simulation1_high | Waste_copper_Simulation1_high | ... | Waste_EOL_silver_bifacialTrend_base | Waste_EOL_copper_bifacialTrend_base | Waste_EOL_aluminium_frames_bifacialTrend_base | Waste_EOL_Module_bifacialTrend_base | Waste_EOL_glass_bifacialTrend_high | Waste_EOL_silicon_bifacialTrend_high | Waste_EOL_silver_bifacialTrend_high | Waste_EOL_copper_bifacialTrend_high | Waste_EOL_aluminium_frames_bifacialTrend_high | Waste_EOL_Module_bifacialTrend_high | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 3.557465e+07 | 7.064407e+07 | 1.903224e+05 | 2.848183e+03 | 3.797870e+06 | 1.102098e+08 | 3.557465e+07 | 7.064407e+07 | 1.903224e+05 | 2.848183e+03 | ... | 0.000000e+00 | 0.000000 | 0.000000e+00 | 2.204195e+08 | 0.000000e+00 | 0.000000e+00 | 0.000000e+00 | 0.000000 | 0.000000e+00 | 2.204195e+08 |
| 1 | 2.708324e+07 | 5.272248e+07 | 1.392646e+05 | 2.169933e+03 | 2.823082e+06 | 8.277023e+07 | 2.708324e+07 | 5.272248e+07 | 1.392646e+05 | 2.169933e+03 | ... | 2.946481e+01 | 1.800032 | 1.008931e+03 | 1.655444e+08 | 2.620761e+03 | 2.813476e+02 | 2.946481e+01 | 1.800032 | 1.008931e+03 | 1.655444e+08 |
| 2 | 3.215794e+07 | 6.125064e+07 | 1.590017e+05 | 2.609763e+03 | 3.015525e+06 | 9.658572e+07 | 3.215794e+07 | 6.125064e+07 | 1.590017e+05 | 2.609763e+03 | ... | 6.500312e+02 | 39.764382 | 2.226990e+04 | 1.932585e+08 | 5.789505e+04 | 6.211031e+03 | 6.500312e+02 | 39.764382 | 2.226990e+04 | 1.932585e+08 |
| 3 | 3.246804e+07 | 6.001756e+07 | 1.558401e+05 | 2.828400e+03 | 2.960336e+06 | 9.560460e+07 | 3.246804e+07 | 6.001756e+07 | 1.558401e+05 | 2.828400e+03 | ... | 4.223356e+03 | 259.147611 | 1.448630e+05 | 1.917763e+08 | 3.773066e+05 | 4.041556e+04 | 4.223356e+03 | 259.147611 | 1.448630e+05 | 1.917763e+08 |
| 4 | 4.681363e+07 | 8.317952e+07 | 2.210346e+05 | 4.625451e+03 | 4.447433e+06 | 1.346662e+08 | 4.681363e+07 | 8.317952e+07 | 2.210346e+05 | 4.625451e+03 | ... | 1.614628e+04 | 993.228826 | 5.543535e+05 | 2.715048e+08 | 1.446094e+06 | 1.547052e+05 | 1.614628e+04 | 993.228826 | 5.543535e+05 | 2.715048e+08 |
| 5 | 5.956584e+07 | 9.979721e+07 | 1.985433e+05 | 7.251887e+03 | 6.229870e+06 | 1.657987e+08 | 5.956584e+07 | 9.979721e+07 | 1.985433e+05 | 7.251887e+03 | ... | 4.560423e+04 | 2810.532847 | 1.566752e+06 | 3.377419e+08 | 4.092002e+06 | 4.373609e+05 | 4.560423e+04 | 2810.532847 | 1.566752e+06 | 3.377419e+08 |
| 6 | 8.272290e+07 | 1.292807e+08 | 2.979944e+05 | 1.239959e+04 | 9.677156e+06 | 2.219911e+08 | 8.272290e+07 | 1.292807e+08 | 2.979944e+05 | 1.239959e+04 | ... | 1.059429e+05 | 6538.820528 | 3.641133e+06 | 4.582729e+08 | 9.520211e+06 | 1.016783e+06 | 1.059429e+05 | 6538.820528 | 3.641133e+06 | 4.582729e+08 |
| 7 | 1.294118e+08 | 1.907181e+08 | 4.886206e+05 | 2.206772e+04 | 1.628803e+07 | 3.369286e+08 | 1.294118e+08 | 1.907181e+08 | 4.886206e+05 | 2.206772e+04 | ... | 2.144086e+05 | 13251.409481 | 7.370260e+06 | 7.028078e+08 | 1.929342e+07 | 2.059190e+06 | 2.144086e+05 | 13251.409481 | 7.370260e+06 | 7.028078e+08 |
| 8 | 1.887176e+08 | 2.607935e+08 | 7.523668e+05 | 3.646577e+04 | 2.571493e+07 | 4.760149e+08 | 1.887176e+08 | 2.607935e+08 | 7.523668e+05 | 3.646577e+04 | ... | 3.905563e+05 | 24174.583554 | 1.342543e+07 | 1.004821e+09 | 3.519704e+07 | 3.753867e+06 | 3.905563e+05 | 24174.583554 | 1.342543e+07 | 1.004821e+09 |
| 9 | 3.002429e+08 | 4.109054e+08 | 1.188847e+06 | 5.977646e+04 | 4.122395e+07 | 7.536209e+08 | 3.002429e+08 | 4.109054e+08 | 1.188847e+06 | 5.977646e+04 | ... | 6.522546e+05 | 40453.948432 | 2.241981e+07 | 1.595529e+09 | 5.889902e+07 | 6.276165e+06 | 6.522546e+05 | 40453.948432 | 2.241981e+07 | 1.595529e+09 |
| 10 | 9.712870e+08 | 5.421610e+08 | 8.669476e+06 | 5.191413e+05 | 2.973426e+08 | 1.819979e+09 | 3.351979e+08 | 4.738747e+08 | 1.518025e+06 | 8.225270e+04 | ... | 8.159801e+06 | 499616.682134 | 2.795393e+08 | 4.733581e+09 | 9.132903e+07 | 9.720015e+06 | 1.008350e+06 | 62728.034108 | 3.465995e+07 | 1.863052e+09 |
| 11 | 7.829401e+08 | 5.801720e+08 | 6.273556e+06 | 3.885719e+05 | 2.190589e+08 | 1.588833e+09 | 3.776974e+08 | 5.376871e+08 | 1.929576e+06 | 1.102368e+05 | ... | 5.792525e+06 | 368888.078361 | 2.013682e+08 | 3.978771e+09 | 1.318408e+08 | 1.400642e+07 | 1.448545e+06 | 90552.978981 | 4.980786e+07 | 2.167040e+09 |
| 12 | 8.236658e+08 | 1.729869e+09 | 1.644644e+06 | 7.743406e+04 | 6.319147e+07 | 2.618448e+09 | 9.823191e+08 | 1.746774e+09 | 3.402026e+06 | 1.864028e+05 | ... | 1.775000e+05 | 13005.626846 | 6.087105e+06 | 5.264017e+09 | 1.775888e+08 | 1.881253e+07 | 1.934882e+06 | 121974.337656 | 6.661259e+07 | 5.977868e+09 |
| 13 | 8.122343e+08 | 1.679519e+09 | 1.654403e+06 | 8.811729e+04 | 6.634735e+07 | 2.559843e+09 | 9.982478e+08 | 1.699330e+09 | 3.712867e+06 | 2.158780e+05 | ... | 3.462268e+05 | 26134.482615 | 1.214208e+07 | 5.174058e+09 | 2.240641e+08 | 2.361927e+07 | 2.404691e+06 | 153895.209184 | 8.306376e+07 | 6.010856e+09 |
| 14 | 1.124835e+09 | 2.248071e+09 | 2.274499e+06 | 1.340193e+05 | 9.566111e+07 | 3.470975e+09 | 1.320263e+09 | 2.268873e+09 | 4.434660e+06 | 2.682466e+05 | ... | 6.366273e+05 | 49763.344910 | 2.292337e+07 | 7.045203e+09 | 2.678817e+08 | 2.799131e+07 | 2.796788e+06 | 183990.718849 | 9.738249e+07 | 7.924156e+09 |
| 15 | 1.873490e+09 | 1.767385e+09 | 2.414865e+06 | 2.297470e+05 | 1.607333e+08 | 3.804254e+09 | 2.194582e+09 | 1.801678e+09 | 5.987860e+06 | 4.502842e+05 | ... | 1.109293e+06 | 90274.278936 | 4.117848e+07 | 7.795217e+09 | 4.525268e+08 | 4.718932e+07 | 4.682289e+06 | 310811.520636 | 1.640154e+08 | 9.241262e+09 |
| 16 | 4.424479e+09 | 4.194998e+09 | 4.456339e+06 | 4.923753e+05 | 3.555811e+08 | 8.980007e+09 | 4.604623e+09 | 4.213958e+09 | 6.402767e+06 | 6.161050e+05 | ... | 1.835279e+06 | 156369.482236 | 7.053943e+07 | 1.828224e+10 | 4.078111e+08 | 4.098579e+07 | 3.781707e+06 | 280099.176625 | 1.382358e+08 | 1.908885e+10 |
| 17 | 7.995833e+09 | 7.411307e+09 | 1.129163e+07 | 1.148255e+06 | 7.531884e+08 | 1.617277e+10 | 7.995833e+09 | 7.411307e+09 | 1.129163e+07 | 1.148255e+06 | ... | 7.755088e+06 | 581547.159220 | 2.733187e+08 | 3.355820e+10 | 8.467050e+08 | 8.429944e+07 | 7.755088e+06 | 581547.159220 | 2.733187e+08 | 3.355820e+10 |
| 18 | 1.012265e+10 | 8.928549e+09 | 1.107252e+07 | 1.382319e+06 | 7.971335e+08 | 1.986078e+10 | 1.012265e+10 | 8.928549e+09 | 1.107252e+07 | 1.382319e+06 | ... | 7.932933e+06 | 663606.923626 | 2.950548e+08 | 4.108412e+10 | 9.661801e+08 | 9.272256e+07 | 7.932933e+06 | 663606.923626 | 2.950548e+08 | 4.108412e+10 |
| 19 | 9.519222e+09 | 8.055741e+09 | 1.288704e+07 | 1.580862e+06 | 8.515391e+08 | 1.844097e+10 | 9.519222e+09 | 8.055741e+09 | 1.288704e+07 | 1.580862e+06 | ... | 1.024880e+07 | 930463.267269 | 4.046787e+08 | 3.877867e+10 | 1.354710e+09 | 1.261634e+08 | 1.024880e+07 | 930463.267269 | 4.046787e+08 | 3.877867e+10 |
20 rows × 48 columns
keyword='mat_Virgin_Stock'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
# Loop over objects
for kk in range(0, len(objects)):
obj = objects[kk]
# Loop over Scenarios
for jj in range(0, len(scenarios)):
case = scenarios[jj]
for ii in range (0, len(materials)):
material = materials[ii]
foo = obj.scenario[case].material[material].materialdata[keyword].copy()
foo = foo.to_frame(name=material)
USyearly["VirginStock_"+material+'_'+obj.name+'_'+case] = foo[material]
filter_col = [col for col in USyearly if (col.startswith('VirginStock_') and col.endswith(obj.name+'_'+case)) ]
USyearly['VirginStock_Module_'+obj.name+'_'+case] = USyearly[filter_col].sum(axis=1)
USyearly = USyearly/1000000 # This is the ratio for Metric tonnes
#907185 -- this is for US tons
UScum = USyearly.copy()
UScum = UScum.cumsum()
UScum.head()
| Waste_glass_Simulation1_base | Waste_silicon_Simulation1_base | Waste_silver_Simulation1_base | Waste_copper_Simulation1_base | Waste_aluminium_frames_Simulation1_base | Waste_Module_Simulation1_base | Waste_glass_Simulation1_high | Waste_silicon_Simulation1_high | Waste_silver_Simulation1_high | Waste_copper_Simulation1_high | ... | VirginStock_silver_bifacialTrend_base | VirginStock_copper_bifacialTrend_base | VirginStock_aluminium_frames_bifacialTrend_base | VirginStock_Module_bifacialTrend_base | VirginStock_glass_bifacialTrend_high | VirginStock_silicon_bifacialTrend_high | VirginStock_silver_bifacialTrend_high | VirginStock_copper_bifacialTrend_high | VirginStock_aluminium_frames_bifacialTrend_high | VirginStock_Module_bifacialTrend_high | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 35.574651 | 70.644070 | 0.190322 | 0.002848 | 3.797870 | 110.209761 | 35.574651 | 70.644070 | 0.190322 | 0.002848 | ... | 10.735207 | 0.590784 | 312.916411 | 1356.206388 | 858.816756 | 173.147230 | 10.735207 | 0.590784 | 312.916411 | 1356.206388 |
| 1 | 62.657891 | 123.366547 | 0.329587 | 0.005018 | 6.620951 | 192.979994 | 62.657891 | 123.366547 | 0.329587 | 0.005018 | ... | 18.588818 | 1.040508 | 545.434342 | 2380.008888 | 1512.576923 | 302.368298 | 18.588818 | 1.040508 | 545.434342 | 2380.008888 |
| 2 | 94.815832 | 184.617192 | 0.488589 | 0.007628 | 9.636476 | 289.565717 | 94.815832 | 184.617192 | 0.488589 | 0.007628 | ... | 27.520702 | 1.573415 | 792.055903 | 3561.139562 | 2287.512338 | 452.477204 | 27.520702 | 1.573415 | 792.055903 | 3561.139562 |
| 3 | 127.283871 | 244.634747 | 0.644429 | 0.010456 | 12.596813 | 385.170316 | 127.283871 | 244.634747 | 0.644429 | 0.010456 | ... | 36.072700 | 2.106354 | 1024.026364 | 4723.908236 | 3062.222820 | 599.479998 | 36.072700 | 2.106354 | 1024.026364 | 4723.908236 |
| 4 | 174.097497 | 327.814264 | 0.865463 | 0.015082 | 17.044245 | 519.836552 | 174.097497 | 327.814264 | 0.865463 | 0.015082 | ... | 47.629499 | 2.859925 | 1344.773035 | 6355.686284 | 4157.451641 | 802.972184 | 47.629499 | 2.859925 | 1344.773035 | 6355.686284 |
5 rows × 72 columns
keyword='Installed_Capacity_[W]'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
# Loop over SF Scenarios
for kk in range(0, len(objects)):
obj = objects[kk]
# Loop over Scenarios
for jj in range(0, len(scenarios)):
case = scenarios[jj]
foo = obj.scenario[case].data[keyword]
foo = foo.to_frame(name=keyword)
UScum["Capacity_"+obj.name+'_'+case] = foo[keyword]
UScum.tail(20)
| Waste_glass_Simulation1_base | Waste_silicon_Simulation1_base | Waste_silver_Simulation1_base | Waste_copper_Simulation1_base | Waste_aluminium_frames_Simulation1_base | Waste_Module_Simulation1_base | Waste_glass_Simulation1_high | Waste_silicon_Simulation1_high | Waste_silver_Simulation1_high | Waste_copper_Simulation1_high | ... | VirginStock_glass_bifacialTrend_high | VirginStock_silicon_bifacialTrend_high | VirginStock_silver_bifacialTrend_high | VirginStock_copper_bifacialTrend_high | VirginStock_aluminium_frames_bifacialTrend_high | VirginStock_Module_bifacialTrend_high | Capacity_Simulation1_base | Capacity_Simulation1_high | Capacity_bifacialTrend_base | Capacity_bifacialTrend_high | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 36 | 7.056043e+05 | 314301.060424 | 642.670688 | 240.903227 | 86191.774810 | 1.106981e+06 | 1.078755e+06 | 5.261496e+05 | 710.661856 | 306.294586 | ... | 3.784116e+07 | 1.879427e+06 | 12173.544789 | 29726.801356 | 4.513629e+06 | 4.427611e+07 | 3.941273e+11 | 7.833385e+11 | 3.941273e+11 | 7.833385e+11 |
| 37 | 8.207424e+05 | 340182.059523 | 730.016950 | 303.121730 | 105940.097677 | 1.267898e+06 | 1.251880e+06 | 5.910551e+05 | 799.378007 | 374.349345 | ... | 4.422125e+07 | 2.137018e+06 | 13490.170378 | 34032.188285 | 5.178966e+06 | 5.158475e+07 | 4.391642e+11 | 9.142533e+11 | 4.391642e+11 | 9.142533e+11 |
| 38 | 9.228722e+05 | 358737.495813 | 797.395860 | 363.915263 | 123576.908589 | 1.406348e+06 | 1.416068e+06 | 6.417343e+05 | 891.598835 | 450.557001 | ... | 4.903227e+07 | 2.331259e+06 | 14482.996477 | 37278.745657 | 5.680502e+06 | 5.709579e+07 | 4.680245e+11 | 1.011295e+12 | 4.680245e+11 | 1.011295e+12 |
| 39 | 1.068318e+06 | 379482.238605 | 906.006306 | 456.411296 | 150425.555463 | 1.599588e+06 | 1.599940e+06 | 6.932022e+05 | 992.389263 | 542.458805 | ... | 5.381943e+07 | 2.524538e+06 | 15470.901000 | 40509.209394 | 6.179461e+06 | 6.257941e+07 | 4.958984e+11 | 1.107415e+12 | 4.958984e+11 | 1.107415e+12 |
| 40 | 1.234903e+06 | 396252.080126 | 1022.510904 | 570.654165 | 182101.797280 | 1.814850e+06 | 1.771494e+06 | 7.254170e+05 | 1094.108714 | 646.339604 | ... | 5.648694e+07 | 2.632237e+06 | 16021.384481 | 42309.299262 | 6.457157e+06 | 6.563466e+07 | 5.107564e+11 | 1.157235e+12 | 5.107564e+11 | 1.157235e+12 |
| 41 | 1.378401e+06 | 411711.266292 | 1098.674107 | 673.243942 | 205910.980659 | 1.997795e+06 | 1.970392e+06 | 7.588882e+05 | 1205.312525 | 773.177375 | ... | 5.914272e+07 | 2.739463e+06 | 16569.450499 | 44101.483986 | 6.733521e+06 | 6.867637e+07 | 5.258773e+11 | 1.206190e+12 | 5.258773e+11 | 1.206190e+12 |
| 42 | 1.653774e+06 | 433623.341467 | 1263.014301 | 870.515851 | 254843.394763 | 2.344374e+06 | 2.218322e+06 | 8.032971e+05 | 1331.769767 | 931.211690 | ... | 6.276618e+07 | 2.885759e+06 | 17317.212942 | 46546.679246 | 7.110725e+06 | 7.282652e+07 | 5.376112e+11 | 1.275546e+12 | 5.376112e+11 | 1.275546e+12 |
| 43 | 1.853240e+06 | 451468.759829 | 1364.148923 | 1023.674831 | 287513.675680 | 2.594610e+06 | 2.503983e+06 | 8.494163e+05 | 1472.776509 | 1122.454318 | ... | 6.637535e+07 | 3.031478e+06 | 18062.027860 | 48982.236049 | 7.486290e+06 | 7.696016e+07 | 5.506204e+11 | 1.343769e+12 | 5.506204e+11 | 1.343769e+12 |
| 44 | 2.119598e+06 | 485199.840883 | 1491.843262 | 1218.603579 | 329020.524716 | 2.936529e+06 | 2.791719e+06 | 8.751029e+05 | 1621.871378 | 1343.230754 | ... | 6.766002e+07 | 3.083348e+06 | 18327.152380 | 49849.197509 | 7.619158e+06 | 7.843070e+07 | 5.941573e+11 | 1.360009e+12 | 5.941573e+11 | 1.360009e+12 |
| 45 | 2.467883e+06 | 522926.919927 | 1666.275260 | 1477.378136 | 384922.232799 | 3.378876e+06 | 3.119713e+06 | 9.026029e+05 | 1786.758438 | 1602.076737 | ... | 6.894008e+07 | 3.135033e+06 | 18591.328911 | 50713.059032 | 7.751394e+06 | 7.989581e+07 | 6.358827e+11 | 1.375256e+12 | 6.358827e+11 | 1.375256e+12 |
| 46 | 2.763511e+06 | 545452.357933 | 1809.374633 | 1721.809723 | 432150.246263 | 3.744645e+06 | 3.507948e+06 | 9.459751e+05 | 1969.148193 | 1901.422098 | ... | 7.171132e+07 | 3.246923e+06 | 19163.231590 | 52583.190023 | 8.039097e+06 | 8.306909e+07 | 6.469407e+11 | 1.422739e+12 | 6.469407e+11 | 1.422739e+12 |
| 47 | 3.082235e+06 | 568893.638162 | 1961.187575 | 1990.088192 | 482513.034682 | 4.137593e+06 | 3.923872e+06 | 9.902728e+05 | 2158.242170 | 2231.863166 | ... | 7.447348e+07 | 3.358446e+06 | 19733.263160 | 54447.202457 | 8.325771e+06 | 8.623188e+07 | 6.574131e+11 | 1.469381e+12 | 6.574131e+11 | 1.469381e+12 |
| 48 | 3.447926e+06 | 602353.168179 | 2129.249544 | 2290.428443 | 538675.855773 | 4.593375e+06 | 4.360538e+06 | 1.033219e+06 | 2349.962828 | 2590.455992 | ... | 7.702390e+07 | 3.461421e+06 | 20259.599285 | 56168.330083 | 8.590293e+06 | 8.915204e+07 | 6.873293e+11 | 1.510703e+12 | 6.873293e+11 | 1.510703e+12 |
| 49 | 3.818778e+06 | 635647.871404 | 2292.504466 | 2601.865129 | 594261.561819 | 5.053582e+06 | 4.819649e+06 | 1.076511e+06 | 2541.194567 | 2977.166374 | ... | 7.956662e+07 | 3.564086e+06 | 20784.348276 | 57884.267754 | 8.853972e+06 | 9.206335e+07 | 7.169444e+11 | 1.551274e+12 | 7.169444e+11 | 1.551274e+12 |
| 50 | 4.126915e+06 | 662175.448352 | 2418.133966 | 2872.015472 | 638273.336940 | 5.432654e+06 | 5.326742e+06 | 1.127069e+06 | 2739.282338 | 3405.882554 | ... | 8.276441e+07 | 3.693198e+06 | 21444.282124 | 60042.262090 | 9.185909e+06 | 9.572500e+07 | 7.399609e+11 | 1.605649e+12 | 7.399609e+11 | 1.605649e+12 |
| 51 | 4.472895e+06 | 690007.061114 | 2553.927437 | 3177.348432 | 687115.209677 | 5.855749e+06 | 5.894137e+06 | 1.179452e+06 | 2950.394949 | 3894.398594 | ... | 8.595324e+07 | 3.821950e+06 | 22102.370539 | 62194.221829 | 9.516733e+06 | 9.937622e+07 | 7.620580e+11 | 1.658458e+12 | 7.620580e+11 | 1.658458e+12 |
| 52 | 4.843828e+06 | 723059.434807 | 2688.785236 | 3500.325645 | 737507.974883 | 6.310585e+06 | 6.566642e+06 | 1.245371e+06 | 3188.124638 | 4469.756177 | ... | 9.023752e+07 | 3.994930e+06 | 22986.526053 | 65085.424630 | 9.961580e+06 | 1.042821e+08 | 7.957611e+11 | 1.734025e+12 | 7.957611e+11 | 1.734025e+12 |
| 53 | 5.272763e+06 | 758179.694619 | 2840.174036 | 3876.983403 | 795430.597242 | 6.833091e+06 | 7.359891e+06 | 1.315671e+06 | 3462.271111 | 5157.792631 | ... | 9.451060e+07 | 4.167459e+06 | 23868.376559 | 67969.090022 | 1.040485e+07 | 1.091747e+08 | 8.280961e+11 | 1.806696e+12 | 8.280961e+11 | 1.806696e+12 |
| 54 | 5.784093e+06 | 803598.572859 | 3015.442309 | 4320.032549 | 863485.041738 | 7.458512e+06 | 8.297148e+06 | 1.392437e+06 | 3781.152979 | 5978.402136 | ... | 9.889390e+07 | 4.344441e+06 | 24772.980939 | 70927.160944 | 1.085914e+07 | 1.141932e+08 | 8.770550e+11 | 1.878772e+12 | 8.770550e+11 | 1.878772e+12 |
| 55 | 6.362243e+06 | 851461.865125 | 3210.823170 | 4824.982492 | 940348.779747 | 8.162090e+06 | 9.370630e+06 | 1.474253e+06 | 4141.516269 | 6924.875672 | ... | 1.032665e+08 | 4.520989e+06 | 25675.376578 | 73878.009251 | 1.131184e+07 | 1.191988e+08 | 9.243998e+11 | 1.947649e+12 | 9.243998e+11 | 1.947649e+12 |
20 rows × 76 columns
USyearly.index = r1.scenario['base'].data['year']
UScum.index = r1.scenario['base'].data['year']
mining2020_aluminum = 65267000
mining2020_silver = 22260
mining2020_copper = 20000000
mining2020_silicon = 8000000
objects = [r1, r2]
scenarios = ['base', 'high']
# PLOTTING GALORE
USyearly.keys()
Index(['Waste_glass_Simulation1_base', 'Waste_silicon_Simulation1_base',
'Waste_silver_Simulation1_base', 'Waste_copper_Simulation1_base',
'Waste_aluminium_frames_Simulation1_base',
'Waste_Module_Simulation1_base', 'Waste_glass_Simulation1_high',
'Waste_silicon_Simulation1_high', 'Waste_silver_Simulation1_high',
'Waste_copper_Simulation1_high',
'Waste_aluminium_frames_Simulation1_high',
'Waste_Module_Simulation1_high', 'Waste_glass_bifacialTrend_base',
'Waste_silicon_bifacialTrend_base', 'Waste_silver_bifacialTrend_base',
'Waste_copper_bifacialTrend_base',
'Waste_aluminium_frames_bifacialTrend_base',
'Waste_Module_bifacialTrend_base', 'Waste_glass_bifacialTrend_high',
'Waste_silicon_bifacialTrend_high', 'Waste_silver_bifacialTrend_high',
'Waste_copper_bifacialTrend_high',
'Waste_aluminium_frames_bifacialTrend_high',
'Waste_Module_bifacialTrend_high', 'Waste_EOL_glass_Simulation1_base',
'Waste_EOL_silicon_Simulation1_base',
'Waste_EOL_silver_Simulation1_base',
'Waste_EOL_copper_Simulation1_base',
'Waste_EOL_aluminium_frames_Simulation1_base',
'Waste_EOL_Module_Simulation1_base', 'Waste_EOL_glass_Simulation1_high',
'Waste_EOL_silicon_Simulation1_high',
'Waste_EOL_silver_Simulation1_high',
'Waste_EOL_copper_Simulation1_high',
'Waste_EOL_aluminium_frames_Simulation1_high',
'Waste_EOL_Module_Simulation1_high',
'Waste_EOL_glass_bifacialTrend_base',
'Waste_EOL_silicon_bifacialTrend_base',
'Waste_EOL_silver_bifacialTrend_base',
'Waste_EOL_copper_bifacialTrend_base',
'Waste_EOL_aluminium_frames_bifacialTrend_base',
'Waste_EOL_Module_bifacialTrend_base',
'Waste_EOL_glass_bifacialTrend_high',
'Waste_EOL_silicon_bifacialTrend_high',
'Waste_EOL_silver_bifacialTrend_high',
'Waste_EOL_copper_bifacialTrend_high',
'Waste_EOL_aluminium_frames_bifacialTrend_high',
'Waste_EOL_Module_bifacialTrend_high',
'VirginStock_glass_Simulation1_base',
'VirginStock_silicon_Simulation1_base',
'VirginStock_silver_Simulation1_base',
'VirginStock_copper_Simulation1_base',
'VirginStock_aluminium_frames_Simulation1_base',
'VirginStock_Module_Simulation1_base',
'VirginStock_glass_Simulation1_high',
'VirginStock_silicon_Simulation1_high',
'VirginStock_silver_Simulation1_high',
'VirginStock_copper_Simulation1_high',
'VirginStock_aluminium_frames_Simulation1_high',
'VirginStock_Module_Simulation1_high',
'VirginStock_glass_bifacialTrend_base',
'VirginStock_silicon_bifacialTrend_base',
'VirginStock_silver_bifacialTrend_base',
'VirginStock_copper_bifacialTrend_base',
'VirginStock_aluminium_frames_bifacialTrend_base',
'VirginStock_Module_bifacialTrend_base',
'VirginStock_glass_bifacialTrend_high',
'VirginStock_silicon_bifacialTrend_high',
'VirginStock_silver_bifacialTrend_high',
'VirginStock_copper_bifacialTrend_high',
'VirginStock_aluminium_frames_bifacialTrend_high',
'VirginStock_Module_bifacialTrend_high'],
dtype='object')
plt.rcParams.update({'font.size': 10})
plt.rcParams['figure.figsize'] = (12, 8)
keyw='VirginStock_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
fig, axs = plt.subplots(1,1, figsize=(4, 6), facecolor='w', edgecolor='k')
fig.subplots_adjust(hspace = .3, wspace=.2)
# Loop over CASES
name2 = 'Simulation1_high'
name0 = 'Simulation1_base'
# ROW 2, Aluminum and Silicon: g- 4 aluminum k - 1 silicon orange - 3 copper gray - 2 silver
axs.plot(USyearly[keyw+materials[2]+'_'+name2]*100/mining2020_silver,
color = 'gray', linewidth=2.0, label='Silver')
axs.fill_between(USyearly.index, USyearly[keyw+materials[2]+'_'+name0]*100/mining2020_silver, USyearly[keyw+materials[2]+'_'+name2]*100/mining2020_silver,
color='gray', lw=3, alpha=.3)
axs.plot(USyearly[keyw+materials[1]+'_'+name2]*100/mining2020_silicon,
color = 'k', linewidth=2.0, label='Silicon')
axs.fill_between(USyearly.index, USyearly[keyw+materials[1]+'_'+name0]*100/mining2020_silicon,
USyearly[keyw+materials[1]+'_'+name2]*100/mining2020_silicon,
color='k', lw=3, alpha=.5)
axs.plot(USyearly[keyw+materials[4]+'_'+name2]*100/mining2020_aluminum,
color = 'g', linewidth=2.0, label='Aluminum')
axs.fill_between(USyearly.index, USyearly[keyw+materials[4]+'_'+name0]*100/mining2020_aluminum,
USyearly[keyw+materials[4]+'_'+name2]*100/mining2020_aluminum,
color='g', lw=3, alpha=.3)
axs.plot(USyearly[keyw+materials[3]+'_'+name2]*100/mining2020_copper,
color = 'orange', linewidth=2.0, label='Copper')
axs.fill_between(USyearly.index, USyearly[keyw+materials[3]+'_'+name0]*100/mining2020_copper,
USyearly[keyw+materials[3]+'_'+name2]*100/mining2020_copper,
color='orange', lw=3, alpha=.3)
axs.set_xlim([2020,2050])
axs.legend()
#axs.set_yscale('log')
#axs.set_ylabel('Virgin material needs as a percentage of 2020 global mining production capacity [%]')
fig.savefig(title_Method+' Fig_1x1_MaterialNeeds Ratio to Production_NREL2018.png', dpi=600)
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='VirginStock_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]})
########################
# SUBPLOT 1
########################
#######################
# loop plotting over scenarios
name2 = 'Simulation1_high'
name0 = 'Simulation1_base'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k.', linewidth=5, label='S1: '+name0+' module mass')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='S1: '+name0+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'c.', linewidth=5, label='S2: '+name2+' module mass')
a0.plot(USyearly.index, glassmat, 'c', linewidth=5, label='S2: '+name2+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='c', alpha=0.3,
interpolate=True)
a0.legend()
a0.set_title('Yearly Virgin Material Needs by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.set_ylabel('Virgin Material Cumulative Needs 2020-2050 [Million Tonnes]')
a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
f.tight_layout()
f.savefig(title_Method+' Fig_2x1_Yearly Virgin Material Needs by Scenario and Cumulatives_NREL2018.png', dpi=600)
print("Cumulative Virgin Needs by 2050 Million Tones by Scenario")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:89: MatplotlibDeprecationWarning: Passing the minor parameter of set_xticks() positionally is deprecated since Matplotlib 3.2; the parameter will become keyword-only two minor releases later. =======C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:89: MatplotlibDeprecationWarning: Passing the minor parameter of set_ticks() positionally is deprecated since Matplotlib 3.2; the parameter will become keyword-only two minor releases later. >>>>>>> main
Cumulative Virgin Needs by 2050 Million Tones by Scenario
0 55.813184 1 113.089407 dtype: float64
name2 = 'bifacialTrend_high'
name0 = 'bifacialTrend_base'
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
print("Cumulative Virgin Needs by 2050 Million Tones by Scenario for Bifacial Trend")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
Cumulative Virgin Needs by 2050 Million Tones by Scenario for Bifacial Trend
0 58.678619 1 119.198844 dtype: float64
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]})
########################
# SUBPLOT 1
########################
#######################
# loop plotting over scenarios
name2 = 'Simulation1_high'
name0 = 'Simulation1_base'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k.', linewidth=5, label='S1: '+name0+' module mass')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='S1: '+name0+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'c.', linewidth=5, label='S2: '+name2+' module mass')
a0.plot(USyearly.index, glassmat, 'c', linewidth=5, label='S2: '+name2+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='c', alpha=0.3,
interpolate=True)
a0.legend()
a0.set_title('Yearly Material Waste by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.set_ylabel('Cumulative Waste by 2050 [Million Tonnes]')
a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
f.tight_layout()
f.savefig(title_Method+' Fig_2x1_Yearly WASTE by Scenario and Cumulatives_NREL2018.png', dpi=600)
print("Cumulative Waste by 2050 Million Tones by case")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:89: MatplotlibDeprecationWarning: Passing the minor parameter of set_xticks() positionally is deprecated since Matplotlib 3.2; the parameter will become keyword-only two minor releases later. =======C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:89: MatplotlibDeprecationWarning: Passing the minor parameter of set_ticks() positionally is deprecated since Matplotlib 3.2; the parameter will become keyword-only two minor releases later. >>>>>>> main
Cumulative Waste by 2050 Million Tones by case
0 8.162090 1 12.150297 dtype: float64
plt.rcParams.update({'font.size': 15})
plt.rcParams['figure.figsize'] = (15, 8)
keyw='Waste_EOL_'
materials = ['glass', 'silicon', 'silver', 'copper', 'aluminium_frames']
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]})
########################
# SUBPLOT 1
########################
#######################
# loop plotting over scenarios
name2 = 'Simulation1_high'
name0 = 'Simulation1_base'
# SCENARIO 1 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name0]+USyearly[keyw+materials[1]+'_'+name0]+
USyearly[keyw+materials[2]+'_'+name0]+USyearly[keyw+materials[3]+'_'+name0]+
USyearly[keyw+materials[4]+'_'+name0])
glassmat = (USyearly[keyw+materials[0]+'_'+name0])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'k.', linewidth=5, label='S1: '+name0+' module mass')
a0.plot(USyearly.index, glassmat, 'k', linewidth=5, label='S1: '+name0+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='k', alpha=0.3,
interpolate=True)
# SCENARIO 2 ***************
modulemat = (USyearly[keyw+materials[0]+'_'+name2]+USyearly[keyw+materials[1]+'_'+name2]+
USyearly[keyw+materials[2]+'_'+name2]+USyearly[keyw+materials[3]+'_'+name2]+
USyearly[keyw+materials[4]+'_'+name2])
glassmat = (USyearly[keyw+materials[0]+'_'+name2])
modulemat = modulemat/1000000
glassmat = glassmat/1000000
a0.plot(USyearly.index, modulemat, 'c.', linewidth=5, label='S2: '+name2+' module mass')
a0.plot(USyearly.index, glassmat, 'c', linewidth=5, label='S2: '+name2+' glass mass only')
a0.fill_between(USyearly.index, glassmat, modulemat, color='c', alpha=0.3,
interpolate=True)
a0.legend()
a0.set_title('Yearly Material Waste by Scenario')
a0.set_ylabel('Mass [Million Tonnes]')
a0.set_xlim([2020, 2050])
a0.set_xlabel('Years')
########################
# SUBPLOT 2
########################
#######################
# Calculate
cumulations2050 = {}
for ii in range(0, len(materials)):
matcum = []
matcum.append(UScum[keyw+materials[ii]+'_'+name0].loc[2050])
matcum.append(UScum[keyw+materials[ii]+'_'+name2].loc[2050])
cumulations2050[materials[ii]] = matcum
dfcumulations2050 = pd.DataFrame.from_dict(cumulations2050)
dfcumulations2050 = dfcumulations2050/1000000 # in Million Tonnes
dfcumulations2050['bottom1'] = dfcumulations2050['glass']
dfcumulations2050['bottom2'] = dfcumulations2050['bottom1']+dfcumulations2050['aluminium_frames']
dfcumulations2050['bottom3'] = dfcumulations2050['bottom2']+dfcumulations2050['silicon']
dfcumulations2050['bottom4'] = dfcumulations2050['bottom3']+dfcumulations2050['copper']
## Plot BARS Stuff
ind=np.arange(2)
width=0.35 # width of the bars.
p0 = a1.bar(ind, dfcumulations2050['glass'], width, color='c')
p1 = a1.bar(ind, dfcumulations2050['aluminium_frames'], width,
bottom=dfcumulations2050['bottom1'])
p2 = a1.bar(ind, dfcumulations2050['silicon'], width,
bottom=dfcumulations2050['bottom2'])
p3 = a1.bar(ind, dfcumulations2050['copper'], width,
bottom=dfcumulations2050['bottom3'])
p4 = a1.bar(ind, dfcumulations2050['silver'], width,
bottom=dfcumulations2050['bottom4'])
a1.yaxis.set_label_position("right")
a1.yaxis.tick_right()
a1.set_ylabel('Cumulative EOL Only Waste by 2050 [Million Tonnes]')
a1.set_xlabel('Scenario')
a1.set_xticks(ind, ('S1', 'S2'))
#plt.yticks(np.arange(0, 81, 10))
a1.legend((p0[0], p1[0], p2[0], p3[0], p4[0] ), ('Glass', 'aluminium_frames', 'Silicon','Copper','Silver'))
f.tight_layout()
f.savefig(title_Method+' Fig_2x1_Yearly EOL Only WASTE by Scenario and Cumulatives_NREL2018.png', dpi=600)
print("Cumulative Eol Only Waste by 2050 Million Tones by case")
dfcumulations2050[['glass','silicon','silver','copper','aluminium_frames']].sum(axis=1)
C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:89: MatplotlibDeprecationWarning: Passing the minor parameter of set_xticks() positionally is deprecated since Matplotlib 3.2; the parameter will become keyword-only two minor releases later. =======C:\ProgramData\Anaconda3\lib\site-packages\ipykernel_launcher.py:89: MatplotlibDeprecationWarning: Passing the minor parameter of set_ticks() positionally is deprecated since Matplotlib 3.2; the parameter will become keyword-only two minor releases later. >>>>>>> main
Cumulative Eol Only Waste by 2050 Million Tones by case
0 6.495971 1 8.922681 dtype: float64